<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <!--{include file='comm/header.tpl'}-->

    <title>抽奖记录列表</title>

    <!--{include file='comm/comm_cal.tpl'}-->
    <script>
    </script>
</head>
<body>
<div style="width:100%">

    <div class="items clearfix">

        <h2 style="" class="tal">
            抽奖记录列表&nbsp;[<!--{$promotionTypeName}-->]
        </h2>

        <div class="items2">

            <div class="search-box">
                <form onsubmit="return false;" name="searchForm" id="searchForm">
                    <div style="position:relative">
                        <span>
                            抽奖时间：<input type="text" style="width: 100px;" readonly="readonly" name="startDate" id="startDate">
                            ～
                            <input type="text" style="width: 100px;" readonly="readonly" name="endDate" id="endDate">
                        </span>
                        <span>
                            <input type="button" onclick="scratch.search();" value="查询" class="btn">&nbsp;&nbsp;
                            <input type="button" onclick="scratch.clear();" value="重置" class="btn">
                        </span>
                    </div>
                </form>
            </div>

            <div>
                <table id="flex" style="display:none"></table>
            </div>

        </div>

    </div>

</div>

<script type="text/javascript">

    $("#flex").flexigrid({
        type: "POST",
        url:"/invokingAjax-backend/promotion/scratch.ajax?operFlg=6&xjx=none&promotionID=<!--{$promotionID}-->",
        dataType: "json",
        colModel : [
            {display: "抽奖日期", width : 100, align: 'left'},
            {display: "抽奖人数", width : 150, align: 'left'},
            {display: "抽奖次数", width : 150, align: 'left'},
            {display: "中奖数", width : 1800, align: 'left'}
        ],
        sortname: "useDate",
        sortorder: "desc",
        usepager: true,
        rp: 10,
        useRp: true,
        showTableToggleBtn: true
    });

    var scratch={
        search: function() {
            var dt = $('#searchForm').serializeArray();
            $('#flex').flexOptions({params: dt}).flexReload();
        },
        clear:function(){
            $('#pcustID').val('');
            $('#startDate').val('');
            $('#endDate').val('');
        }
    }

    cal.manageFields("startDate", "startDate", "%Y-%m-%d");
    cal.manageFields("endDate", "endDate", "%Y-%m-%d");

</script>
</body>
</html>